package com.elai.baseconfig.service.impl;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.elai.baseconfig.mapper.EventTypeMapper;
import com.elai.baseconfig.domain.EventTypeDO;
import com.elai.baseconfig.service.EventTypeService;

/**
 * 事件类型Service业务层处理
 *
 * @author elai
 * @date 2021-04-03
 */
@Service
public class EventTypeServiceImpl implements EventTypeService
{
    @Autowired
    private EventTypeMapper eventTypeMapper;

    /**
     * 查询事件类型
     *
     * @param id 事件类型ID
     * @return 事件类型
     */
    @Override
    public EventTypeDO selectEventTypeById(Long id)
    {
        return eventTypeMapper.selectEventTypeById(id);
    }

    /**
     * 查询事件类型列表
     *
     * @param eventType 事件类型
     * @return 事件类型
     */
    @Override
    public List<EventTypeDO> selectEventTypeList(EventTypeDO eventType)
    {
        return eventTypeMapper.selectEventTypeList(eventType);
    }

    /**
     * 新增事件类型
     *
     * @param eventType 事件类型
     * @return 结果
     */
    @Override
    public int insertEventType(EventTypeDO eventType)
    {
        return eventTypeMapper.insertEventType(eventType);
    }

    /**
     * 修改事件类型
     *
     * @param eventType 事件类型
     * @return 结果
     */
    @Override
    public int updateEventType(EventTypeDO eventType)
    {
        return eventTypeMapper.updateEventType(eventType);
    }

    /**
     * 批量删除事件类型
     *
     * @param ids 需要删除的事件类型ID
     * @return 结果
     */
    @Override
    public int deleteEventTypeByIds(Long[] ids)
    {
        return eventTypeMapper.deleteEventTypeByIds(ids);
    }

    /**
     * 删除事件类型信息
     *
     * @param id 事件类型ID
     * @return 结果
     */
    @Override
    public int deleteEventTypeById(Long id)
    {
        return eventTypeMapper.deleteEventTypeById(id);
    }

    @Override
    public int deleteEventTypeAll(Long appCode) {
        return eventTypeMapper.deleteEventTypeAll(appCode);
    }

    @Override
    public List<EventTypeDO> selectEventTypeByRela(String appCode) {
        return eventTypeMapper.selectEventTypeByRela(appCode);
    }

    @Override
    public int deleteEventTypeByRela(List<EventTypeDO> typeDOList) {
        return eventTypeMapper.deleteEventTypeByRela(typeDOList);
    }

    @Override
    public EventTypeDO selectEventTypeId(String appCode, String eventItemNameCode) {
        return eventTypeMapper.selectEventTypeId( appCode,eventItemNameCode);
    }

    @Override
    public void deleteEventTypeByAppCode(String appCode) {
        eventTypeMapper.deleteEventTypeByAppCode(appCode);
    }

    @Override
    public void deleteEventTypeByLesseeId(String lesseeId) {
        eventTypeMapper.deleteEventTypeByLesseeId(lesseeId);
    }

    @Override
    public List<EventTypeDO> selectAllEventType() {
        return eventTypeMapper.selectAllEventType();
    }
}
